//package com.health.hfm.sys.config.security;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.HttpMethod;
//import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.builders.WebSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
//import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
//
//@Configuration
//@EnableResourceServer
//@EnableGlobalMethodSecurity(prePostEnabled = true)
//public class SecurityConfig extends WebSecurityConfigurerAdapter {
//
//    @Override
//    protected void configure(HttpSecurity http) throws Exception {
////        //允许跨域
////        http.cors().and().anonymous().and()
////                // CRSF禁用，因为不使用session
////                .csrf().disable();
////        http.authorizeRequests().antMatchers(
////                HttpMethod.GET,
////                "/*.html",
////                "/**/*.html",
////                "/**/*.css",
////                "/**/*.js"
////        ).permitAll()
////                .antMatchers("/profile/**").anonymous()
////                .antMatchers("/common/download**").anonymous()
////                .antMatchers("/common/download/resource**").anonymous()
////                .antMatchers("/swagger-ui.html").anonymous()
////                .antMatchers("/swagger-resources/**").anonymous()
////                .antMatchers("/webjars/**").anonymous()
////                .antMatchers("/*/api-docs").anonymous()
////                .antMatchers("/druid/**").anonymous()
////                // 除上面外的所有请求全部需要鉴权认证
////                .anyRequest().permitAll();
//        http.authorizeRequests()
//                .antMatchers("/*").authenticated();
//    }
//
//    @Override
//    public void configure(WebSecurity web) throws Exception {
//        web.ignoring().antMatchers("/v2/api-docs",
//                "/swagger-resources/configuration/ui",
//                "/swagger-resources",
//                "/swagger-resources/configuration/security",
//                "/swagger-ui.html");
//    }
//
//@Override
//public void configure(WebSecurity web) {
//        web.ignoring().antMatchers("/css/**");
//        }

//}
//
